package com.hujing.exception.service.impl;

import com.hujing.exception.service.ExceptionService;
import org.springframework.stereotype.Service;

@Service
public class ExceptionServiceImpl implements ExceptionService {

    @Override
    public void handleException(Exception e) {
        try {
            int num = 1 / 0;
        } catch (Exception ex) {
            e.printStackTrace();
        }
    }

    @Override
    public void throwException(Exception e) throws Exception{
        int num = 1 / 0;
    }

}
